J.Ff = J.P.extend({
    o: function(a, b, c, d) {
        this.start = a;
        this.end = b;
        this.transition = c;
        this.precision = d || 0;
        this.ah = !1;
        return this
    },
    oi: function(a) {
        this.Ie = +new Date;
        this.frames = 0;
        this.Ph = a;
        this.startTime = +new Date;
        this.ah = !0;
        this.cu = J.e.ni(this.update, this, !1)
    },
    update: function() {
        this.cu = J.e.ni(this.update, this, !1);
        this.frames += 1;
        var a = +new Date,
            b = a - this.startTime,
            b = this.transition ? this.transition(this.start, this.end, b, this.frames, a - this.Ie) : null;
        "number" === typeof b && Math.abs(b - this.end) < this.precision && (this.stop(), b = this.end);
        this.Ie = a;
        this.Ok.call(this.Ph || this, b)
    },
    stop: function(a) {
        J.e.ou(this.cu);
        a && this.update();
        this.ah = !1
    }
});
J.Ff.Easing = {
    Linear: {
        None: function(a) {
            return a
        }
    },
    Bounce: {
        In: function(a) {
            return 1 - (a < 1 / 2.75 ? 7.5625 * a * a: a < 2 / 2.75 ? 7.5625 * (a -= 1.5 / 2.75) * a + 0.75 : a < 2.5 / 2.75 ? 7.5625 * (a -= 2.25 / 2.75) * a + 0.9375 : 7.5625 * (a -= 2.625 / 2.75) * a + 0.984375)
        },
        Out: function(a) {
            return J.Ff.Easing.Bounce.In(1 - a)
        }
    },
    Cubic: {
        In: function(a) {
            return 1 - a * a * a
        },
        Out: function(a) {
            a = 1 - a;
            return 1 - a * a * a
        }
    }
};
J.Oc = J.P.extend({
    pb: [J.ga, J.Nc, J.Pv],
    o: function(a, b) {
        this.Sb = b;
        this.Lf = this.Qf = this.Sf = !1;
        this.u = a;
        this.vE();
        this.D("renderer", b);
        this.D("size", b);
        this.D("zooms", b);
        this.D("limitBounds", b);
        this.D("view", b);
        this.D("lang", b, !0);
        this.D("features", b, !0);
        this.D("mapStyle", b);
        this.D("layers", b);
        this.D("overlays", b);
        this.D("infos", b, !0);
        this.D("contextmenus", b, !0);
        this.D("coordsBound", b);
        this.D("controls", b);
        this.D("bounds", b);
        this.D("draw", b);
        this.Hc(["zoomAndCenter", "destroy", "defaultCursor", "jogEnable", "animateEnable"], b);
        this.Hc("rotateEnable dragEnable keyboardEnable doubleClickZoom scrollWheel zoomEnable touchZoom".split(" "), b, !0);
        this.get("jogEnable") ? this.Fk = !0 : this.Fk = !1;
        this.Hz();
        this.Jz();
        this.D("resizeEnable", b);
        this.Sb.map = this;
        var c = this.get("size"),
            c = c.width * c.height / 65536;
        J.f.la && 3 < c && (this.eu = !0);
        this.Mc()
    },
    mapStyleChanged: function() {
        J.f.Vi && ("dark" === this.get("mapStyle") ? this.u.style.backgroundColor = "#202020": this.u.style.backgroundColor = "")
    },
    getTargetLevel: function() {
        var a = this.get("targetLevel", null, !0);
        a || (a = this.get("zoom"));
        return a
    },
    resizeEnableChanged: function() {
        this.Kz()
    },
    QB: function() {
        var a = this.get("size"); ! a.xb(this.to) && this.get("resizeEnable") && (this.Qq = !0, this.set("display"), this.Ww(a), this.Z("resize", {
            iF: this.to,
            Wv: a
        }), this.to = a);
        this.qx = a
    },
    SC: function() {
        var a;
        if (this.get("center") instanceof J.B) {
            a = new J.ec( - 180, -85, 180, 85);
            var b = this.zb(a.Xh());
            a = this.zb(a.cj());
            this.Dn = {
                Nd: b.x,
                Lc: b.y,
                Cd: a.x,
                Zc: a.y
            }
        } else a = this.get("limitBounds"),
            this.Dn = {
                Nd: a[0],
                Lc: a[1],
                Cd: a[2],
                Zc: a[3]
            }
    },
    GC: function() {
        var a = this.get("limitBounds"),
            b = this.get("bounds");
        b.Ga.r > b.za.r && (b.za.r += 360);
        if (!a.contains(b)) {
            var c = this.get("center").gb();
            a.yd() < b.yd() ? c.r = a.Te().r: (a.Ga.r > b.Ga.r && (c.r += a.Ga.r - b.Ga.r), a.za.r < b.za.r && (c.r += a.za.r - b.za.r));
            a.xd() < b.xd() ? c.w = a.Te().w: (a.Ga.w > b.Ga.w && (c.w += a.Ga.w - b.Ga.w), a.za.w < b.za.w && (c.w += a.za.w - b.za.w));
            return c
        }
    },
    Yr: function() {
        this.Dn || this.SC();
        return this.Dn
    },
    Kz: function() {
        if (this.get("resizeEnable")) {
            if (!this.Hh) {
                this.to = this.get("size");
                var a = J.e.bind(function() {
                        this.QB();
                        this.Hh = setTimeout(a, 200)
                    },
                    this);
                this.Hh = setTimeout(a, 200)
            }
        } else this.qx = this.get("size"),
        this.Hh && (clearTimeout(this.Hh), delete this.Hh)
    },
    rendererChanged: function() {
        this.iz();
        this.Cm = new J.L.canvas.Oc(this)
    },
    iz: function() {
        J.f.Gk || this.set("renderer", "dom", !0)
    },
    viewChanged: function(a) {
        if (a = this.get("view")) this.view = new J.Fy(a, this)
    },
    vE: function() {
        var a = this.u;
        J.a.Zb(a, "amap-container");
        var b = {};
        b.Yc = J.a.create("div", a, "amap-maps");
        this.Hi = J.a.create("div", a);
        this.Hi.style.display = "none";
        b.Uf = J.a.create("div", b.Yc, "amap-drags");
        b.G = J.a.create("div", b.Uf, "amap-layers");
        b.ba = J.a.create("div", b.Uf, "amap-overlays");
        b.controls = J.a.create("div", a, "amap-controls");
        b.cq = J.a.create("a", a, "amap-logo");
        var c = window.location.host; - 1 === c.indexOf("amap.com") && -1 === c.indexOf("gaode.com") && (b.cq.href = J.f.aa ? "http://m.amap.com": "http://gaode.com", b.cq.target = "_blank");
        J.a.create("img", b.cq).src = J.f.la ? this.Sb.j.logoUrlRetina: this.Sb.j.logoUrl;
        b.WC = J.a.create("div", a, "amap-copyright");
        b.WC.innerHTML = 350 > J.a.Ak(this.u).width ? "": this.Sb.j.copyright;
        this.ua = b
    },
    layersChanged: function() {
        this.Xa = this.Xa || [];
        for (var a = this.get("layers"), b = 0; b < this.Xa.length; b += 1) if (this.Xa[b] !== this.Ab && this.Xa[b] !== this.$g && -1 === J.e.indexOf(a, this.Xa[b].$b)) {
            this.Xa[b].sc && this.Xa[b].zu();
            var c = this.Xa[b].ka;
            if (c) {
                if (c.length) for (var d = 0; d < c.length; d += 1) c[d].parentNode && c[d].parentNode.removeChild(c[d]);
                else c.parentNode && c.parentNode.removeChild(c);
                this.Xa[b].ka = null
            }
            this.Xa[b].$b.jg && this.Xa[b].$b.jg();
            this.Xa[b].$b.Oe = !1;
            this.Xa[b].$b.G = null;
            this.Xa[b].jn();
            this.Xa = J.e.rk(this.Xa, b);
            b = -1
        }
        for (b = 0; b < a.length; b += 1) if (a[b].Oe) - 1 === J.e.indexOf(this.Xa, a[b].G) && this.Xa.push(a[b].G);
        else if (c = this.rf(a[b])) this.Xa.push(c),
            a[b].Oe = !0,
            a[b].G = c;
        this.Sb.isHotspotChanged();
        this.set("display", 0)
    },
    controlsChanged: function() {
        var a = this.get("controls"),
            b,
            c;
        if (a.add && 0 < a.add.length) for (; 0 < a.add.length;) b = a.add.shift(),
        (c = b.ik || b.addTo) && c.call(b, this.Sb, this.ua.controls);
        else if (a.remove && a.remove.length) for (; 0 < a.remove.length;) b = a.remove.shift(),
        (c = b.Vk || b.removeFrom) && c.call(b, this.Sb, this.ua.controls)
    },
    Rt: function() {
        var a = this;
        this.Tt = !1;
        a.Ab || (a.Ab = new J.G.nc(new hb, a), a.Ab.Af = 36, a.Ab.Bf = 36, a.Ab.set("zIndex", 120), a.Xa.push(a.Ab), a.Ab.pm = !0);
        for (var b = a.get("overlays"), c = [], d = 0; d < a.bb.length; d += 1) - 1 === J.e.indexOf(b, a.bb[d].hc) && (a.bb[d].hc instanceof N || a.bb[d].hc instanceof M ? a.bb[d].jg() : (a.Ab && a.bb[d] instanceof J.ba.od ? a.Ab.Jw([a.bb[d].t]) : a.$g && a.$g.Jw([a.bb[d].t]), a.bb[d].t.H ? (J.a.remove(a.bb[d].t.H), a.bb[d].t.H = null) : a.bb[d].t.T && (J.a.remove(a.bb[d].t.T.Wb), J.a.remove(a.bb[d].t.T.Aa), a.bb[d].t.T = null), a.bb[d].$e && a.bb[d].$e.stop(), a.bb[d].hc.Oe = !1, a.bb[d].hc.Rd.map = null, a.bb[d].hc.ba = null, a.bb[d].hc = null, a.bb[d].t.jD(), a.bb[d].t = null, a.bb[d].jn(), a.bb[d].Rd = null, a.bb[d].nk()), c.push(a.bb[d]));
        for (d = 0; d < c.length; d += 1) a.bb = J.e.rk(a.bb, J.e.indexOf(a.bb, c[d]));
        var f = [],
            g = [];
        J.e.wG(function(b) {
                if (!b.Oe && b.eg) {
                    var c = b.ba || a.uC(b);
                    c && (a.bb.push(c), c instanceof J.ba.wg || c instanceof J.ba.ln ? c.$v() : c instanceof J.ba.od ? f.push(c.t) : g.push(c.t), b.Oe = !0)
                }
            },
            b);
        f.length && a.Ab.Ti(f);
        g.length && (a.$g || (a.$g = new J.G.nc(new hb, a), a.$g.set("zIndex", 110), a.Xa.push(a.$g)), a.$g.Ti(g));
        a.set("display", 0)
    },
    overlaysChanged: function() {
        this.bb = this.bb || [];
        this.get("overlays") && 0 === this.get("overlays").length ? this.Rt() : this.Tt || (J.e.ni(this.Rt, this), this.Tt = !0)
    },
    contextmenusChanged: function() {
        var a = this.get("contextmenu");
        if (a) {
            var b = this;
            J.La.load("overlay",
                function() {
                    b.km = new J.ba.ln(a, b);
                    b.set("display", 0)
                })
        }
    },
    infosChanged: function() {
        var a = this.get("infos");
        if (a) {
            this.Wg = this.Wg || {};
            var b, c = this;
            J.La.load("overlay",
                function() {
                    for (var d in a) a.hasOwnProperty(d) && (b = a[d], c.Wg[d] = c.Wg[d] || new J.ba.wg(b, c))
                })
        }
    },
    uC: function(a) {
        var b = null;
        if (a instanceof O) b = new J.ba.od(a, this);
        else if (a instanceof M) b = new J.ba.ln(a, this);
        else if (a instanceof N) b = new J.ba.wg(a, this);
        else {
            var c = ["overlay"];
            "dom" !== this.get("renderer") || J.f.jw ? c.push("cvector") : (c.push("dvector"), J.f.dg ? c.push("svg") : c.push("vml"));
            if (!this.pH && !J.La.Dv(c)) {
                var d = this;
                J.La.ue(c,
                    function() {
                        this.pH = !0;
                        d.overlaysChanged()
                    });
                return
            }
            a instanceof R ? b = new J.ba.Pc(a, this) : a instanceof Q ? b = new J.ba.gd(a, this) : a instanceof P && (b = new J.ba.tg(a, this))
        }
        return b
    },
    kI: function() {
        function a() {}
        var b = new J.G.nc,
            c = [],
            d = new J.B(116.405467, 39.907761);
        new J.style.mc.ql;
        for (var f = 0; 100 > f; f += 1) for (var g = 0; 100 > g; g += 1) {
            var h = new J.B(d.r + 0.02 * g, d.w + 0.02 * f),
                h = new J.ge({
                    name: "point" + (100 * f + g),
                    map: this,
                    ta: new J.R.fd(this.zb(h))
                });
            c[100 * f + g] = h;
            h.c("hover", a, h)
        }
        b.Ti(c);
        this.Xa.push(b)
    },
    xa: function() {},
    jI: function(a) {
        var b = new J.G.nc,
            c = [],
            c = (new J.iy({
                map: this
            })).Iw(a);
        b.Ti(c);
        this.Xa.push(b);
        this.set("display", 0)
    },
    rf: function(a) {
        a = a.rf(this);
        if (!a) return null;
        if (a.length) {
            var b = this;
            J.La.ue(a,
                function() {
                    b.layersChanged()
                })
        } else return a;
        return null
    },
    aJ: function() {
        return this.ua
    },
    $J: function() {
        this.set("display", 0)
    },
    displayChanged: function(a) {
        this.oG(a)
    },
    oG: function(a) {
        if (a) if (J.e.ou(this.mG), J.f.Gd) {
            var b = this;
            setTimeout(function() {
                    b.Mc()
                },
                0)
        } else this.Mc();
        else this.Sx || (this.mG = J.e.ni(this.Mc, this), this.Sx = !0)
    },
    Mc: function() {
        this.Sx = !1;
        var a = {};
        if (this.Xa) {
            a.Xa = this.Xa.sort(function(a, b) {
                return a.get("zIndex") > b.get("zIndex") ? 1 : a.get("zIndex") === b.get("zIndex") ? a.Cn > b.Cn ? 1 : -1 : -1
            });
            a.size = this.get("size");
            a.qC = 15E5 < a.size.width * a.size.height;
            a.aa = J.f.aa;
            a.sa = this.view.fE();
            a.ac = this.Lf;
            a.gf = this.Sf;
            a.gq = this.Qf;
            a.en = this.Qf && J.f.aa;
            a.Zq = J.f.aa && this.Sf;
            a.cl = J.f.aa && this.Lf;
            this.cl = a.cl;
            a.Uv = !a.gf || 0.5 > Math.abs(a.sa.zoom - this.get("targetLevel"));
            a.Ha = this.get("coordsBound");
            a.eu = this.eu;
            for (var b = !1,
                     c = 0; c < this.Xa.length; c += 1) this.Xa[c].ag().la && (b = !0);
            a.la = b;
            a.scale = Math.pow(2, a.sa.zoom - a.sa.qb);
            this.Cm.Mc(a)
        }
    },
    $I: function() {
        return this.Cm
    },
    HD: function() {
        var a = [],
            b = this.get("controls").yb,
            c;
        for (c in b) b[c].bj && b[c].bj() && a.push(b[c].bj());
        return a
    },
    destroyChanged: function() {
        this.Hh && clearTimeout(this.Hh);
        this.wB();
        this.bA();
        this.ro && this.ro();
        this.MB();
        this.u.Kn = null
    },
    MB: function() {
        var a = this.u;
        J.a.SF(a);
        delete this.ZH;
        this.Hi = null;
        J.a.Nb(a, "amap-container")
    },
    jogEnableChanged: function() {
        this.get("jogEnable") ? this.Fk = !0 : this.Fk = !1
    },
    drawChanged: function() {
        var a = this,
            b, c, d = this.get("draw");
        if (d) {
            this.bg || (this.bg = []);
            b = 0;
            for (c = this.bg.length; b < c; b += 1) this.bg[b].UF();
            J.La.load("interaction",
                function() {
                    var b = new J.HH({
                            type: d,
                            G: a.$g
                        },
                        a);
                    a.bg.push(b);
                    a.loaded = !0
                })
        } else if (this.bg) for (b = 0, c = this.bg.length; b < c; b += 1) this.bg[b].UF(),
            this.bg[b].sI(),
            this.A("click", this.bg[b].lJ, this)
    }
});
J.Oc.rc({
    Hz: function() {
        J.f.dc && this.az();
        J.f.aa || this.Yy()
    },
    wB: function() {
        J.f.dc && this.gA();
        J.f.aa || this.cA()
    },
    rotateEnableChanged: function() {
        this.Qm = this.get("rotateEnable");
        J.f.dc && (this.Qm ? this.rC() : this.hF())
    },
    zoomEnableChanged: function() {
        this.get("zoomEnable") ? (J.f.dc && this.fu(), J.f.aa || this.$y()) : (J.f.dc && this.Yv(), J.f.aa || this.fA())
    },
    mousewheelChanged: function() {},
    af: function(a, b) {
        var c, d = {};
        a || (a = window.event);
        d.type = a.type;
        var f = J.h.se(a, this.ua.Yc);
        J.f.dc && ("touchend" !== a.type ? this.F.Js = f: f = this.F.Js);
        d.mb = f;
        d.Dd = this.jm(f);
        d.bi = this.Ng(f); (f = this.wz(d.Dd)) && 0 < f.length && f[0].Ih && (c = f[0].Ih, d.Ul = f[0]);
        c || (c = this);
        d.Qc = c;
        d.SH = a.altKey;
        d.ctrlKey = a.ctrlKey;
        d.button = J.f.dc ? 0 : a.button; ! b && a.preventDefault && a.preventDefault();
        delete d.type;
        return d
    },
    Gs: function(a) {
        return a && a !== this && a !== document
    },
    wt: function() {
        if ((!this.Qe || this.Qe.ah) && this.F.tk && this.F && this.F.Md) {
            var a = this.F.tk.mb.Ba(this.F.Md);
            a.x || a.y ? (this.F.Qf = !0, this.F.sh || (this.F.uk.k("dragstart", this.F.Ou), this.F.sh = !0), this.F.uk.k("dragging", this.F.tk), this.F.Md = this.F.tk.mb) : this.F.Qf = !1
        }
    },
    LG: function(a) {
        for (var b = [], c = 0; c < a.length; c += 1) a[c] && (b = b.concat(a[c]));
        return b
    },
    wz: function(a) {
        var b, c = this;
        this.Xa.sort(function(a, b) {
            return a.get("zIndex") > b.get("zIndex") ? -1 : 1
        });
        this.Cm.vp(a, this.Xa,
            function(a) {
                b = a;
                b = c.LG(b)
            },
            function() {
                b = []
            });
        return b
    }
});
J.Oc.rc({
    Jz: function() {
        this.c("moveend", this.aw, this);
        J.f.Gd && (J.f.br || J.f.Wo) && this.c("zoomend", this.jr, this);
        this.c("movestart", this.bw, this);
        this.c("zoomstart", this.iw, this);
        this.c("zoomend", this.hw, this);
        this.Pn()
    },
    iw: function() {
        this.Sf = !0
    },
    hw: function() {
        this.Sf = !1;
        this.set("display")
    },
    bA: function() {
        this.A("moveend", this.aw, this);
        J.f.Gd && (J.f.br || J.f.Wo) && this.A("zoomend", this.jr, this);
        this.A("movestart", this.bw, this);
        this.A("zoomstart", this.iw, this);
        this.A("zoomend", this.hw, this);
        this.dA()
    },
    aw: function(a) {
        this.Qf = !1;
        this.Ww(); ! a.Ev && this.get("limitBounds") ? (a = this.GC()) && !a.xb(this.get("center")) ? this.Wm(this.get("zoom"), a, !1, !0) : this.Z("moveend") : this.Z("moveend");
        this.set("display")
    },
    bw: function() {
        this.Qf = !0
    },
    dragEnableChanged: function() { (this.qm = this.get("dragEnable")) ? this.On() : this.qo()
    },
    Z: function(a, b) {
        var c;
        b && (c = b.Wv ? {
            type: a,
            newsize: b.Wv,
            oldsize: b.iF
        }: {
            type: a,
            pixel: b.mb,
            target: this.Sb,
            lnglat: b.bi
        });
        this.Sb.k(a, c)
    },
    Pn: function() {
        this.c("click", this.Us);
        this.c("dblclick", this.Ws);
        J.f.dc && this.cz();
        J.f.aa || this.Zy()
    },
    dA: function() {
        this.A("click", this.Us);
        this.A("dblclick", this.Ws);
        J.f.dc && this.hA();
        J.f.aa || this.eA()
    },
    Jl: function(a, b) {
        var c = this.getTargetLevel(),
            c = 0 < b ? Math.floor(c) + 1 : Math.ceil(c) - 1,
            c = Math.min(Math.max(c, this.get("zooms")[0]), this.get("zooms")[1]);
        c === this.get("zoom") || this.Cc && this.Cc.ah && c === this.Cc.end || this.mr(c, !1, a)
    },
    Us: function(a) {
        this.Z("click", a)
    },
    Ws: function(a) {
        this.get("doubleClickZoom") && this.get("zoomEnable") && this.Jl(a.Dd, 1);
        this.Z("dblclick", a)
    },
    $H: function(a) {
        this.Jl(a.rK, a.sK);
        this.Z("touchend", a)
    },
    On: function() {
        this.qm && (this.c("dragstart", this.Zs), this.c("dragging", this.Xs), this.c("dragend", this.Ys))
    },
    qo: function() {
        this.qm || (this.A("dragstart", this.Zs), this.A("dragging", this.Xs), this.A("dragend", this.Ys))
    },
    Zs: function(a) {
        this.Lf = !0;
        this.F.Pu = a.mb.x;
        this.F.Qu = a.mb.y;
        this.zd && (this.zd.stop(), this.rm(!0));
        this.Z("dragstart");
        this.Z("movestart");
        this.k("movestart", a);
        this.QG()
    },
    Xs: function(a) {
        var b = this.F,
            c = a.mb.x - b.Pu,
            d = a.mb.y - b.Qu;
        if (d || c) {
            this.F.Qf = !0;
            b.Pu = a.mb.x;
            b.Qu = a.mb.y;
            a = c;
            var b = d,
                f = this.Qm ? this.rotation: 0;
            f && (f *= Math.PI / 180, a = c * Math.cos(f) + Math.sin(f) * d, b = -Math.sin(f) * c + Math.cos(f) * d);
            a = this.get("centerCoords").Ba((new J.C(a, b)).Mb(this.N)); (b = this.tu(a)) && (d = Math.round(this.Pg(b).Ba(this.Pg(a)).y));
            this.ig(this.ua.Uf, c, d);
            a.x = (a.x + J.e.Sa) % J.e.Sa;
            this.set("centerCoords", a, !0);
            this.set("center", this.qe(a), !0);
            this.Fk && (this.Ie ? (a = new Date, this.vh = 100 < a - this.Ie ? new J.C(0, 0) : new J.C(c, d), this.Dl = a - this.Ie, this.Ie = a) : this.Ie = new Date);
            this.Z("dragging");
            this.Z("mapmove")
        } else this.F.Qf = !1,
            this.vh = null
    },
    ig: function(a, b, c) {
        if (a) {
            var d = parseFloat(a.style.top) || 0,
                f = parseFloat(a.style.left) || 0,
                g = "";
            this.get("rotation") && (g = J.a.fh[J.a.vb] + ":rotate(" + this.rotation + "deg);overflow:visible;");
            a.style.cssText = "position:absolute;top:" + (d + c) + "px;left:" + (f + b) + "px;" + g
        }
    },
    tu: function(a) {
        var b = this.Yr(),
            c = this.qx.height * this.N / 2;
        return a.y < b.Lc + c ? (a.y = b.Lc + c, a) : a.y > b.Zc - c ? (a.y = b.Zc - c, a) : null
    },
    Ys: function() {
        100 < new Date - this.Ie && (this.vh = null);
        this.F.Md = null;
        this.Lf = !1;
        this.Z("dragend");
        if (this.Fk && this.vh) if (this.F.Qf) {
            var a = this.vh,
                b = new J.C(0, 0),
                c = a.Tc(b);
            12 < c / this.Dl && (a.x *= 12 / c, a.y *= 12 / c);
            this.zd = new J.Ff(a, b,
                function(a, b, c) {
                    return 400 <= c ? b: a.Mb(1 - c / 400).floor()
                },
                1);
            this.zd.Ok = function(a) {
                if (2 > Math.abs(a.x) && 2 > Math.abs(a.y)) this.zd.stop(),
                    this.k("moveend"),
                    this.rm(),
                    this.Dl = this.vh = this.Ie = null;
                else {
                    var b = a.x,
                        c = a.y,
                        h = this.Qm ? this.rotation: 0;
                    h && (h *= Math.PI / 180, b = a.x * Math.cos(h) + Math.sin(h) * a.y, c = -Math.sin(h) * a.x + Math.cos(h) * a.y);
                    b = this.get("centerCoords").Ba((new J.C(b, c)).Mb(this.N));
                    c = this.tu(b);
                    h = a.y;
                    c && (h = Math.round(this.Pg(c).Ba(this.Pg(b)).y));
                    this.ig(this.ua.Uf, a.x, h);
                    b.x = (b.x + J.e.Sa) % J.e.Sa;
                    this.set("centerCoords", b, !0);
                    this.set("center", this.qe(b), !0);
                    this.Z("mapmove")
                }
            };
            this.zd.oi(this)
        } else this.k("moveend"),
            this.rm(),
            this.Dl = this.vh = this.Ie = null;
        else this.k("moveend"),
            this.rm(),
            this.Dl = this.vh = this.Ie = null
    },
    QG: function() {
        if (!this.F.refresh) {
            var a = this;
            this.F.refresh = setInterval(function() {
                    a.set("display", 1)
                },
                J.f.aa ? 400 : 200)
        }
    },
    jr: function() {
        if (J.f.aa && (J.f.br || J.f.Wo)) for (var a = this.ua.G.childNodes,
                                                   b = 0; b < a.length; b += 1) {
            var c = a[b];
            c instanceof HTMLCanvasElement && (c.width = 0)
        }
    },
    rm: function(a) {
        this.F.refresh && (clearInterval(this.F.refresh), this.F.refresh = null);
        a || (this.jr(), this.set("display", 1))
    },
    Ww: function(a) {
        this.set("refresh", a)
    }
});
J.Oc.rc({
    setZoomSlow: function(a) {
        this.Wm(a, null, !this.get("animateEnable"))
    },
    setPanTo: function(a) {
        this.Wm(null, a, !this.get("animateEnable"))
    },
    zoomAndCenterChanged: function(a) {
        var b = a[0];
        b < this.get("zooms")[0] && (b = this.get("zooms")[0]);
        b > this.get("zooms")[1] && (b = this.get("zooms")[1]);
        this.Wm(b, a[1], a[2] || !this.get("animateEnable"))
    },
    zoomChanged: function() {
        this.N = this.get("resolution");
        this.k("closeOverlays");
        this.set("display", 0)
    },
    rotationChanged: function() {
        this.rotation = this.get("rotation");
        this.set("display", 0)
    },
    centerCoordsChanged: function() {
        this.k("closeOverlays");
        this.set("display", 0)
    }
});
J.Fy = J.P.extend({
    pb: [J.ga, J.Nc],
    o: function(a, b) {
        this.view = a;
        this.map = b;
        this.D("zoom", a);
        this.D("rotation", a);
        this.D("size", b);
        this.D("resolution", a);
        this.D("crs", a);
        this.D("rotateEnable", b);
        a.D("centerCoords", this, !0);
        b.D("resolution", this);
        b.D("zoom", this);
        b.D("crs", this);
        b.D("resolution", this);
        b.D("centerCoords", this);
        b.D("rotation", this);
        b.D("center", this);
        this.D("center", a)
    },
    centerChanged: function() {
        this.set("centerCoords", this.map.zb(this.get("center")))
    },
    centerCoordsChanged: function() {
        var a = this.map.Yr(),
            b = this.get("centerCoords"),
            c = this.get("size").height * this.getResolution() / 2;
        this.get("size");
        this.getResolution();
        this.get("center") instanceof J.B ? b.x = (b.x + 4.00750166855784E7) % 4.00750166855784E7: 0 > b.x ? b.x = 0 : b.x > a.Cd && (b.x = a.Cd);
        b.y < a.Lc + c ? b.y = a.Lc + c: b.y > a.Zc - c && (b.y = a.Zc - c)
    },
    zoomChanged: function() {},
    rotationChanged: function() {},
    getResolution: function(a) {
        return this.get("crs").Ve(a || this.get("zoom"))
    },
    fE: function() {
        return {
            zoom: this.get("zoom"),
            Kg: this.get("center"),
            Oa: this.get("centerCoords"),
            rotation: this.get("rotateEnable") && parseInt(this.get("rotation")) || 0,
            yc: this.get("crs"),
            N: this.getResolution(),
            qb: Math.round(this.get("zoom")),
            ab: this.getResolution(Math.round(this.get("zoom")))
        }
    }
});